package cn.cinz.pojo;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

/***
 *
 * 博客实体
 */
public class Blog {

    private String blogId;//博客id
    private String blogTitle;//博客标题

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")//避免从数据库取日期的时候 变成时间戳
    private Date blogDate;//博客创建时间

    private String blogMemo;//博客便签
    private String blogValue;//博客内容
    private String blogStatus;//博客状态 私有 公用
    private int pageViews;//博客浏览量
    private String userName;//博客作者

    public Blog() {

    }

    public Blog(String blogId, String blogTitle, Date blogDate, String blogMemo, String blogValue, String blogStatus, int pageViews, String userName) {
        this.blogId = blogId;
        this.blogTitle = blogTitle;
        this.blogDate = blogDate;
        this.blogMemo = blogMemo;
        this.blogValue = blogValue;
        this.blogStatus = blogStatus;
        this.pageViews = pageViews;
        this.userName = userName;
    }

    public Blog(String blogTitle, Date blogDate, String blogMemo, String blogValue, String blogStatus, String userName) {
        this.blogTitle = blogTitle;
        this.blogDate = blogDate;
        this.blogMemo = blogMemo;
        this.blogValue = blogValue;
        this.blogStatus = blogStatus;
        this.userName = userName;
    }

    public Blog(String blogId, String blogTitle, Date blogDate, String blogMemo, String blogValue, String blogStatus, String userName) {
        this.blogId = blogId;
        this.blogTitle = blogTitle;
        this.blogDate = blogDate;
        this.blogMemo = blogMemo;
        this.blogValue = blogValue;
        this.blogStatus = blogStatus;
        this.userName = userName;
    }


    @Override
    public String toString() {
        return "Blog{" +
                "blogId='" + blogId + '\'' +
                ", blogTitle='" + blogTitle + '\'' +
                ", blogDate=" + blogDate +
                ", blogMemo='" + blogMemo + '\'' +
                ", blogValue='" + blogValue + '\'' +
                ", blogStatus='" + blogStatus + '\'' +
                ", pageViews=" + pageViews +
                ", userName='" + userName + '\'' +
                '}';
    }

    public String getBlogTitle() {
        return blogTitle;
    }

    public void setBlogTitle(String blogTitle) {
        this.blogTitle = blogTitle;
    }

    public Date getBlogDate() {
        return blogDate;
    }

    public void setBlogDate(Date blogDate) {
        this.blogDate = blogDate;
    }

    public String getBlogMemo() {
        return blogMemo;
    }

    public void setBlogMemo(String blogMemo) {
        this.blogMemo = blogMemo;
    }

    public String getBlogValue() {
        return blogValue;
    }

    public void setBlogValue(String blogValue) {
        this.blogValue = blogValue;
    }

    public String getBlogStatus() {
        return blogStatus;
    }

    public void setBlogStatus(String blogStatus) {
        this.blogStatus = blogStatus;
    }

    public int getPageViews() {
        return pageViews;
    }

    public void setPageViews(int pageViews) {
        this.pageViews = pageViews;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getBlogId() {
        return blogId;
    }

    public void setBlogId(String blogId) {
        this.blogId = blogId;
    }
}
